<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich"
    template="layout/template.xhtml">

<ui:define name="body">

    <rich:panel>
        <f:facet name="header">Cliente Details</f:facet>


        <s:decorate id="apellido" template="layout/display.xhtml">
            <ui:define name="label">Apellido</ui:define>
            <h:outputText value="#{clienteHome.instance.apellido}"/>
        </s:decorate>

        <s:decorate id="celular" template="layout/display.xhtml">
            <ui:define name="label">Celular</ui:define>
            <h:outputText value="#{clienteHome.instance.celular}"/>
        </s:decorate>

        <s:decorate id="direccion" template="layout/display.xhtml">
            <ui:define name="label">Direccion</ui:define>
            <h:outputText value="#{clienteHome.instance.direccion}"/>
        </s:decorate>

        <s:decorate id="email" template="layout/display.xhtml">
            <ui:define name="label">Email</ui:define>
            <h:outputText value="#{clienteHome.instance.email}"/>
        </s:decorate>

        <s:decorate id="nombre" template="layout/display.xhtml">
            <ui:define name="label">Nombre</ui:define>
            <h:outputText value="#{clienteHome.instance.nombre}"/>
        </s:decorate>

        <s:decorate id="numeroDocumento" template="layout/display.xhtml">
            <ui:define name="label">Numero documento</ui:define>
            <h:outputText value="#{clienteHome.instance.numeroDocumento}"/>
        </s:decorate>

        <s:decorate id="telefonoFijo" template="layout/display.xhtml">
            <ui:define name="label">Telefono fijo</ui:define>
            <h:outputText value="#{clienteHome.instance.telefonoFijo}"/>
        </s:decorate>

        <div style="clear:both"/>

    </rich:panel>

    <div class="actionButtons">

        <s:button view="/ClienteEdit.xhtml"
                    id="edit"
                 value="Edit"/>

        <s:button view="/#{empty clienteFrom ? 'ClienteList' : clienteFrom}.xhtml"
                    id="done"
                 value="Done"/>

    </div>

    <rich:tabPanel switchType="ajax">

    <rich:tab>
        <f:facet name="label">
            <h:panelGroup><h:graphicImage value="/img/manytoone.gif" style="vertical-align: middle; padding-right: 4px;"/>Tipo documento</h:panelGroup>
        </f:facet>
    <div class="association" id="tipoDocumentoParent">

        <h:outputText value="There is no tipoDocumento associated with this cliente."
                   rendered="#{clienteHome.instance.tipoDocumento == null}"/>

        <rich:dataTable var="_tipoDocumento"
                   value="#{clienteHome.instance.tipoDocumento}"
                rendered="#{clienteHome.instance.tipoDocumento != null}"
              rowClasses="rvgRowOne,rvgRowTwo"
                      id="tipoDocumentoTable">
            <h:column>
                <f:facet name="header">Id</f:facet>
                <h:outputText value="#{_tipoDocumento.id}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Descripcion</f:facet>
                <h:outputText value="#{_tipoDocumento.descripcion}"/>
            </h:column>
            <h:column styleClass="action">
                <f:facet name="header">Action</f:facet>
                <s:link id="viewtipoDocumento"
                     value="View"
                      view="/TipoDocumento.xhtml">
                    <f:param name="tipoDocumentoId"
                           value="#{_tipoDocumento.id}"/>
                </s:link>
            </h:column>
        </rich:dataTable>

    </div>
    </rich:tab>
</rich:tabPanel>
</ui:define>

</ui:composition>
